package com.example.chat.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.chat.domain.entity.UserInfo;
import com.example.chat.domain.vo.UserDetailVo;
import com.example.chat.mapper.UserInfoMapper;
import com.example.chat.result.Result;
import com.example.chat.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;
    @Override
    public Result getUserInfo(Long id) {
        UserDetailVo userDetail = userInfoMapper.getUserDetail(id);
        return Result.ok(userDetail);
    }
}
